﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace TImSdk
{
    public static class ByteExtension
    {
        public static IntPtr BytesToStruct(this byte[] bytes)
        {
            int size = bytes.Length;
            IntPtr buffer = Marshal.AllocHGlobal(size);
           
            Marshal.Copy(bytes, 0, buffer, size);
            return buffer;
           
            
        }
    }
}
